#pragma once

#include <MyControls/App.h>
#include <icache/dll.h>
#include <irender/settings.h>
#include "CXComp.h"
#include "MainFrame.h"
#include "Processor.h"

class CXView;

class Claxa : public My::App<CXComp, MainFrame>
{
	typedef My::App<CXComp, MainFrame> Base;
public:
	icache::dll		m_Cache;
	Processor		m_Processor;
	irender::settings m_RenderSettings;

public:
	Claxa();

public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();

private:
/*	HINSTANCE m_hInstResDLL;
	enum Language {
		English,
		Russian
	};
	Language m_Language;
*/
private:
	void LoadLanguageResourseDll();
	void SetLanguage(My::Language);

public:
	afx_msg void OnAppAbout();
	afx_msg void OnCacheSettings();
	afx_msg void OnRenderingSettings();
	DECLARE_MESSAGE_MAP()
	afx_msg void OnLanguageEnglish();
	afx_msg void OnUpdateLanguageEnglish(CCmdUI *pCmdUI);
	afx_msg void OnLanguageRussian();
	afx_msg void OnUpdateLanguageRussian(CCmdUI *pCmdUI);
	virtual BOOL PreTranslateMessage(MSG* pMsg);
};

extern Claxa theApp;

inline CXComp & theComp()
	{ return theApp.GetDoc(); }
